package cn.yunhe.controller;

public class CalculatorAction extends BaseAction {

	private static final long serialVersionUID = 1L;

	private int paramA;
	private int paramB;
	


	public int getParamA() {
		return paramA;
	}

	public void setParamA(int paramA) {
		this.paramA = paramA;
	}

	public int getParamB() {
		return paramB;
	}

	public void setParamB(int paramB) {
		this.paramB = paramB;
	}

	public String add() {
		getMapRequest().put("result", paramA+paramB);
		return SUCCESS;
	}

	public String subtraction() {
		getMapRequest().put("result", paramA-paramB);
		return SUCCESS;
	}

	public String multiplication() {
		getMapRequest().put("result", paramA*paramB);
		return SUCCESS;
	}

	public String div() {
		getMapRequest().put("result", paramA/paramB);
		return SUCCESS;
	}
}
